package com.xie.service;

import com.xie.dao.StudentMapper;
import com.xie.pojo.Student;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    private StudentMapper studentMapper;
    public void setStudentMapper(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    public Student loginStudent(Student student) {
        return studentMapper.loginStudent(student);
    }

    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    public List<Student> queryAllStudent() {
        return studentMapper.queryAllStudent();
    }

    public int deleteStudent(String sid) {
        return studentMapper.deleteStudent(sid);
    }

    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    public Student queryStudent(String sid) {
        return studentMapper.queryStudent(sid);
    }
}
